Ext.define("AmpleHarvest.DATA.Store.cClassification",
{
	extend				: 'Ext.data.Store',
	requires			:
	[
		"AmpleHarvest.DATA.Model.cClassification"
	],
	model				: 'AmpleHarvest.DATA.Model.cClassification',
	remoteSort			: true,
	m_obj_Params		: null,
	proxy				:
	{
		type	: 'ajax',
		url		: obj_config.C_STR_EXTERNAL_PATH+'/DropDown/Classification.php',
		reader	:
		{
			type			: 'json',
			root			: 'data',
			totalProperty	: "totalCount"
		}
	},
	initComponent		: function()
	{
		this.m_obj_Params = new Object();
		this.callParent();
	},

	setType				: function(str_Type)
	{
		if (!this.m_obj_Params)
		{
			this.m_obj_Params = new Object;
		}
		this.m_obj_Params.type = str_Type;

		this.set_Params();
	},

	setClassification	: function(str_Class)
	{
		if (!this.m_obj_Params)
		{
			this.m_obj_Params = new Object;
		}
		this.m_obj_Params.classification = str_Class;

		this.set_Params();
	},

	set_Params			: function()
	{
		if (!this.m_obj_Params)
		{
			this.m_obj_Params = new Object;
		}
		this.proxy.extraParams = this.m_obj_Params;
	}
}
);
